package com.zc.angelica.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zc.angelica.entity.MenuInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 菜单信息表(MenuInfo)表数据库访问层
 *
 * @author makejava
 * @since 2022-04-05 23:52:04
 */
@Mapper
public interface MenuInfoMapper extends BaseMapper<MenuInfo> {

    IPage<MenuInfo> getMenuByPage(IPage<MenuInfo> page, @Param("roleCode")List<String> roleCode,@Param("accountId")Long accountId);

    List<MenuInfo> getAllMenu( @Param("roleCode")List<String> roleCode,@Param("accountId")Long accountId);

    MenuInfo getMenuBySort(@Param("sort")Integer sort,@Param("parentId")Long parentId);

    MenuInfo getMenuMaxSort(@Param("parentId")Long parentId);
}

